import axios from "axios";
import wpsreq from "../wpsrequest";

function getStandardTime(){
    const now=new Date()
    return now.toUTCString()
}

export function getUserData(data){
    // console.log("getUserData data",data)
    return wpsreq.get("oauthapi/v3/user",{
        headers:{
            "Content-Type":'application/json'
        },
        params:{
            appid:data.appid,
            access_token:data.access_token,
            openid:data.openid
        }
    })
}

export function getFilesList(data){
    console.log("fileilist data",data)
    return wpsreq.get('/oauthapi/v3/app/files/list',{
        headers:{
            'Content-Type':'application/json'
        },
        params:{
            appid:data.appid,
            access_token:data.access_token,
            open_parentid:data.open_parentid
        }
    })
}